<!DOCTYPE html>

<html>

<head>
    <meta charset="utf-8">
    <title>辖区医疗废物处置及时性统计表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
    <style type="text/css">
        .laytable-cell-radio.layui-table-cell {
            padding: 0 5px 0 15px;
        }
        
        .laytable-cell-radio span {
            display: none;
        }
        
        .laytable-cell-radio .layui-form-radio {
            padding-right: 0;
            margin: 0;
        }
    </style>
</head>

<body>
    <div class="layui-form" style="margin-left:20px;margin-top:15px;margin-bottom:-20px">
        <div class="layui-form-item">
            <label class="layui-form-label">统计日期</label>
            <div class="layui-inline">
                <input type="text" class="layui-input" id="datetime" placeholder="请选择日期">
            </div>
            <button class="layui-btn layui-btn-normal" data-type="reload" id="serch"><i class="layui-icon">&#xe615;</i>统计</button>
        </div>
    </div>
    <table id="demo" lay-filter="test"></table>
    <script src="../../layuiadmin/layui/layui.js"></script>
    <script src="../../layuiadmin/layui/jquery-3.3.1.min.js"></script>
    <script>
        layui.config({
            base: '../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index']);
        layui.use('laydate', function() {
            var laydate = layui.laydate;

            //执行一个laydate实例
            laydate.render({
                elem: '#datetime', //指定元素
                theme: '#1E9FFF'
            });
        });
        layui.use('table', function() {
            var table = layui.table;
            var $ = layui.$;

            var tableIns = table.render({
                elem: '#demo',
                height: 'full-80',
                data: [],
                cols: [
                    [ //表头
                        {

                            title: '及时性',
                            width: "10%"
                        }, {
                            field: 'way',
                            title: '类别',
                            width: "10%"
                        }, {

                            title: '全市',
                            width: "10%",
                            align: 'center' //,
                                //templet: function(d) {
                                //  return (parseInt(d.num_0) + parseInt(d.num_1) + parseInt(d.num_3) + parseInt(d.num_4) + parseInt(d.num_5) + parseInt(d.nval1_2) + parseInt(d.nval1_5))
                                //}
                        }, {
                            field: 'shangchengqu',
                            title: '上城区',
                            width: "5%"

                        }, {
                            field: 'xiachengqu',
                            title: '下城区',
                            width: "5%"

                        }, {
                            field: 'xihuqu',
                            title: '西湖区',
                            width: "5%"

                        }, {
                            field: 'jiangganqu',
                            title: '江干区',
                            width: "5%"

                        }, {
                            field: 'gongshuqu',
                            title: '拱墅区',
                            width: "5%"

                        }, {
                            field: 'yuhangqu',
                            title: '余杭区',
                            width: "5%"

                        }, {
                            field: 'binjiangqu',
                            title: '滨江区',
                            width: "5%"

                        }, {
                            field: 'xiaoshanqu',
                            title: '萧山区',
                            width: "5%"

                        }, {
                            field: 'fuyangqu',
                            title: '富阳区',
                            width: "5%"

                        }, {
                            field: 'linanqu',
                            title: '临安区',
                            width: "5%"

                        }, {
                            field: 'jiandeshi',
                            title: '建德市',
                            width: "5%"

                        }, {
                            field: 'chunanxian',
                            title: '淳安县',
                            width: "5%"

                        }, {
                            field: 'tongluxian',
                            title: '桐庐县',
                            width: "5%"

                        }

                    ]
                ],
                skin: 'row', //表格风格				
                even: true,
            });
            $("#serch").on('click', function() {
                tableIns.reload({
                    url: '../../../Collect/hcustcollect',
                    where: {
                        date: $("#datetime").val(),
                        custid: $("#select option:selected").val()
                    } //设定异步数据接口的额外参数

                });
                $("table tr").css({
                    "background": "#1E9FFF",
                    "color": "white"
                });
            });


            $("table tr").css({
                "background": "#1E9FFF",
                "color": "white"
            });

        });
    </script>
</body>

</html>